<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include  file="/jsps/common/taglibs.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD id=Head1><TITLE>订单列表</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK 
href="css/Style.css" type=text/css rel=stylesheet><LINK 
href="css/Manage.css" type=text/css rel=stylesheet>
<SCRIPT language=javascript src="js/FrameDiv.js"></SCRIPT>

<SCRIPT language=javascript src="js/Common.js"></SCRIPT>

<link rel="stylesheet" type="text/css" href="<c:url value="/css/list.css"/>">


<META content="MSHTML 6.00.2900.3492" name=GENERATOR>
<script type="text/javascript">
 function doQuery(pageno)
         {
           if(pageno<1 || pageno>${page.totalPageNum})
           {
              alert("页号超出范围，有效范围：[1-"+${page.totalPageNum}+"]!");
              ${'pageNo'}.select();
              return;
           }
           //location.href="<c:url value="/indentMgr?act=for_list"/>"+"&page_no="+pageno;
           document.forms[0].page_no.value=pageno;
           document.forms[0].submit();
         }
         function doQuery2(){
           
           var pageNo=document.getElementById("pageNo").value;
           doQuery(pageNo);
           
         }
         
   function update(order_no){
   location.href="<c:url value="/indent?act=preUpdate&orderNo="/>"+order_no;
   }
   function checkIndent(order_no){
   location.href="<c:url value="/indent?act=indent_detail&orderNo="/>"+order_no;
   }
 </script>
</HEAD>
<body>


    <div  class="wrapper_div">&nbsp; 
          <span class="title">查询订单信息</span>
          <div class="wrapper_div">
              <form class="search_form" action="<c:url value="/indent"/>" method="post">
                  <input type="hidden" name="act" value="for_list"/>
                  <input type="hidden" name="page_no" value=""/>
                  <span  style="margin-left:10px">订单号:</span>
                  <input type="text" name="order_no" value="${param.order_no}" size="5"/>
                  <span  style="margin-left:10px">客户昵称:</span>
                  <input type="text" name="order_name" value="${param.order_name}" size="5"/>
                  <span>订单状态:</span>	     
	              <select name="indentSign">
                      <option value="">=请选择=</option>
                      <option value="0" <c:if test="${param.indentSign==0}"> selected=selected </c:if>>未审核</option>
                      <option value="1" <c:if test="${param.indentSign==1}"> selected=selected </c:if>>审核未通过</option>
                      <option value="2" <c:if test="${param.indentSign==2}"> selected=selected </c:if>>审核已通过</option>
                  </select>
                  
                  <span  style="margin-left:10px">起始日期:</span>
                  <input type="text" name="startDate" value="${param.startDate}" size="5"/>
                  <span  style="margin-left:10px">截止日期:</span>
                  <input type="text" name="endDate" value="${param.endDate}" size="5"/>
                  &nbsp;
                  
                  <input type="submit" value="查 询"/>
              </form>
          </div>
      </div>
     
   <div>     
   <TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
            <TABLE id=grid 
            style="BORDER-TOP-WIDTH: 0px; FONT-WEIGHT: normal; BORDER-LEFT-WIDTH: 0px; BORDER-LEFT-COLOR: #cccccc;margin-top:0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #cccccc; WIDTH: 100%; BORDER-TOP-COLOR: #cccccc; FONT-STYLE: normal; BACKGROUND-COLOR: #cccccc; BORDER-RIGHT-WIDTH: 0px; TEXT-DECORATION: none; BORDER-RIGHT-COLOR: #cccccc" 
            cellSpacing=1 cellPadding=2 rules=all border=0>
              <TBODY>
              <TR 
              style="FONT-WEIGHT: bold; FONT-STYLE: normal; BACKGROUND-COLOR: #eeeeee; TEXT-DECORATION: none;text-align:center">
                <TD>订单号</TD>
                <TD>客户昵称</TD>
                <TD>客户姓名</TD>
                <TD>订单状态</TD>
                <TD>送货方式</TD>
                <TD>地址</TD>
               
                <TD>付款方式</TD>
                <TD>邮箱</TD>
                <TD>申请时间</TD>
                <TD>订单总额</TD>
                <TD>操作</TD></TR>
             
              <c:forEach items="${page.pageContent}" var="indent">
              <TR 
              style="FONT-WEIGHT: normal; FONT-STYLE: normal; BACKGROUND-COLOR: white; TEXT-DECORATION: none;text-align:center">
             
                <TD>${indent.orderNo}</TD>
                <TD>${indent.name}</TD>
                <TD>${indent.reallyName }</TD>
                <TD>          
                  
                    <c:choose>
                             <c:when test="${indent.sign==0}">
                                    未审核
                             </c:when>
                             <c:when test="${indent.sign==1}">
                                   审核未通过
                             </c:when>
                             <c:when test="${indent.sign==2}">
                                 审核已通过
                             </c:when>
                             
                         </c:choose>
                       
                     
                </TD>
                <TD>${indent.post}</TD>
                <TD>${indent.address}</TD>
               
                <TD>${indent.setMony }</TD>
                <TD>${indent.email}</TD>
                <TD>${indent.createDate}</TD>
                <TD>${indent.orderAmount}</TD>
                
                <TD><button onclick="update(${indent.orderNo});">修改</button>
                   
                   <button onclick="checkIndent(${indent.orderNo});">审核</button>
                 
                
</TD></TR></c:forEach>
            </TBODY></TABLE></TABLE></div>
    
     <div class="page_infos" style="margin-top:0px;background:white">
	            共${page.totalRecNum}条, 当前显示${page.startIndex}-${page.endIndex}条, 第${page.pageNo}/${page.totalPageNum}页
	           |
	           <c:if test="${page.pageNo>1}">
	             <span class="linkspan" onclick="doQuery(1)">首页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.prePage}">
	             <span class="linkspan" onclick="doQuery(${page.pageNo-1})">上一页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.nextPage}">
	             <span class="linkspan" onclick="doQuery(${page.pageNo+1})">下一页</span>&nbsp;
	           </c:if>
	           <c:if test="${page.pageNo!=page.totalPageNum}">
	             <span class="linkspan" onclick="doQuery(${page.totalPageNum})">末页</span>&nbsp;
	           </c:if>
	           |
	            到<input type="text" id="pageNo" size=4 style="text-align:right;" onkeypress="onlynumber();"/>页
	        <button onclick="doQuery2();">跳 转</button>         		           	           	              
	  </div>
	   <c:if test="${empty page.pageContent}">
          <div class="no_found" style="font-color:red">
              sorry,无法查找到您所要求的订单信息.......
          </div>
      </c:if>
 </body>
</HTML>